//
//  TFListOfWinnersCell.swift
//  TalkfunSDKDemo
//
//  Created by 莫瑞权 on 2022/5/6.
//  Copyright © 2022 Talkfun. All rights reserved.
//

import UIKit

class TFListOfWinnersCell: UITableViewCell {
    @objc public let serialNumber = UILabel() //序列号 0  1  2
    @objc public let name = UILabel() //中奖的名字

    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.backgroundColor = UIColor.clear
        
        self.serialNumber.font = UIFont.PingFang(size: 15)
        serialNumber.textAlignment = .right
        self.contentView.addSubview(serialNumber)
        
 
        self.name.font  =  UIFont.PingFang(size: 15)
        self.contentView.addSubview(self.name)
        
    }
    override func layoutSubviews() {
        super.layoutSubviews()
        
        self.serialNumber.frame = CGRect(x: 0, y: 0, width: 30, height: self.frame.height)
        
       let  nameX = self.serialNumber.frame.maxX+15
       self.name.frame = CGRect(x: nameX, y: 0, width: self.frame.size.width - nameX, height: self.frame.size.height)
  
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    

}
